#!/bin/bash

# Import "_include.sh" to include other shared scripts
PGD=`echo $0 | awk -F '/' '{for (i=1;i<NF;i++) printf("%s/", $i); printf("\n")}'`
. $PGD/_include.sh

# Import shared scripts
_include "check.sh"

# Program Main
_assert_non_empty "Param1" "$1"
ProviderName=$1
SignFile="/tmp/$ProviderName.text"
LogFile="/var/lib/Pegasus/cache/$ProviderName.log"
WaitSecs="10"

if [ ! -f "$SignFile" ]
then
    cimconfig -c -s traceLevel=4
    cimconfig -c -s traceComponents=ALL
    touch /tmp/$ProviderName.text

    /etc/init.d/tog-pegasus stop
    sleep $WaitSecs
    /etc/init.d/tog-pegasus start
fi

tail -f $LogFile



